import java.lang.ref.SoftReference;
import java.util.Scanner;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/5/7
 * Time:17:12
 **/
public class Main2 {
    /**
     * 每日一题-超长正整数相加
     *
     * @param args
     */
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String addend = sc.nextLine();
            String augend = sc.nextLine();
            String res = AddLongInteger(addend, augend);
            System.out.println(res);
        }
    }

    private static String AddLongInteger(String addend, String augend) {
        StringBuilder sb = new StringBuilder();
        int carry = 0;
        int i = addend.length() - 1, j = augend.length() - 1;
        while (i >= 0 || j >= 0 || carry != 0) {
            int sum = carry;
            if (i >= 0) {
                sum += addend.charAt(i--) - '0';
            }
            if (j >= 0) {
                sum += augend.charAt(j--) - '0';
            }
            sb.append(sum % 10);
            carry = sum / 10;
        }
        return sb.reverse().toString();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str = sc.nextLine();
            String[] s = str.split(" ");//以空格分开
            System.out.println(add(s[0], s[1]));
        }
    }

    /**
     * 相加
     *
     * @param str1 1
     * @param str2 2
     * @return 相加
     */
    public static String add(String str1, String str2) {
        char[] ch1 = str1.toCharArray();
        char[] ch2 = str2.toCharArray();

        //判断是否合法
        if (!check(ch1) || !check(ch2)) {//若任意一个非法
            return "error";
        }

        //比较两个字符串的长度，将短的字符串加到长的字符串上
        if (ch1.length < ch2.length) {
            char[] temp = ch1;
            ch1 = ch2;
            ch2 = temp;
        }//让ch1一直保持为最长的字符串

        //计算进位
        int flag = 0;//表示进位
        int i = ch1.length - 1;
        int j = ch2.length - 1;
        for (; j >= 0; j--, i--) {//每加一位 将i、j向前一位
            int add = ch1[i] - '0' + ch2[j] - '0' + flag;//ch1[i]-'0'-->这个操作表示将其变为数字
            ch1[i] = (char) (add % 10 + '0');
            flag = add / 10;
            //eg:6+8=14,ch1[i]=4,flag=1
        }
        for (; i >= 0; i--) {
            int add = flag + ch1[i] - '0';
            ch1[i] = (char) (add % 10 + '0');
            flag = add / 10;
        }
        StringBuilder sb = new StringBuilder();
        if (flag != 0) {
            sb.append(flag);
        }
        for (int k = 0; k < ch1.length; k++) {
            sb.append(ch1[k]);
        }
        return sb.toString();
    }

    /**
     * 判断是否合法
     *
     * @param ch 字符
     * @return 返回是否合法
     */
    public static boolean check(char[] ch) {
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] > '9' || ch[i] < '0') {
                return false;
            }
        }
        return true;
    }
}
